<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>Nearby Map</title>
	<link type="text/css" rel="stylesheet" href="nearbymap.css">
	<link rel="canonical" href="http://www.nearbymap.com/">
	<script src="https://maps.googleapis.com/maps/api/js?sensor=true&libraries=places"></script>
	<script type='text/javascript' src='https://www.google.com/jsapi'></script>
	<script type='text/javascript' src='nearbymap-min.js'></script>
	<script src="https://www.googleapis.com/fusiontables/v1/query?sql=SELECT%20*%20FROM%201alijL-Ib3_Mjiash2A8tcJosG0eljkT0mNBXNd8&callback=storeFusionData&key=AIzaSyAdknM5MFaotgggSTAAPEU7WezHoENIv9U"></script>
	<script src="https://www.googleapis.com/fusiontables/v1/query?sql=SELECT%20*%20FROM%2017CDTnF9Ubq2UeaOmQ_nQWQ6UiXEnLOSBN0Mop5Q&callback=storeSpfFusionData&key=AIzaSyAdknM5MFaotgggSTAAPEU7WezHoENIv9U"></script>
	<script type="text/javascript">var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-34190252-1']); _gaq.push(['_trackPageview']);
	(function() {var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
	ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
	var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})();
	</script>
	<noscript><br>There is a problem in running script. <b><a href="http://thin.nearbymap.com/">Click here to try basic page</a></b><br><br></noscript>
</head>
<body onload="initialize()">
<div id="headers" style="display:none;" >
	<ul id="globalnav" align="center">
		<li><a id="aMed" href="#" onclick="showInputs('MED');">Medical Services</a></li>
		<li><a id="aMeet" href="#" onclick="showInputs('MEET');">Meet Halfway</a></li>
		<li><a id="aGovt" href="#" onclick="showInputs('GOVT');">SPF Establishments</a></li>
	</ul>
	<div id="meetHeader" style="display:none;"><b>Nearby Map - Meet Halfway</b> : Find places to meet someone half-way</div>
	<div id="medHeader" style="display:none;" ><b>Nearby Map - Medical Services</b> : Find a doctor nearby</div>
	<div id="govtHeader" style="display:none;" ><b>Nearby Map - SPF Establishments</b> : Find a Police Station nearby<br/><span class="lil">(Spacial data is taken from data.gov.sg file SPF_Establishments.kml on Nov 30, 2012)</span></div>
	<br/><br/>
</div>
<div id="inputs" style="display:none;" >
	Start Point 1: <input id="startField1" type="search" size="40">
	<select id="mode1">
		<option value="DRIVING">Driving</option>
		<option value="TRANSIT">Transit</option>
		<option value="WALKING">Walking</option>
		<option value="BICYCLING">Bicycling</option>
	</select>
	<div id="inputSpeciality" style="display:none;" >
		<select id="speciality">
			<option value="General">General</option>
			<option value="Dentist">Dentist</option>
		</select>
	</div>
	<div id="inputMode2" style="display:none;" ><br/>
		Start Point 2: <input id="startField2" type="search" size="40">
		<select id="mode2">
			<option value="DRIVING">Driving</option>
			<option value="TRANSIT">Transit</option>
			<option value="WALKING">Walking</option>
			<option value="BICYCLING">Bicycling</option>
		</select>
	</div>
	<button type="button" onclick="processUserReq();">Get Places</button>
</div>
<div id="map" style="display:none;" ></div><br/>
<div id="resultPanel" style="display:none;" >
	<div id="routesHead"><b>Destination Points</b> (click to see directions)</div>
	<div id='routesTable'></div><br/>
	<div id="directionsHead"><b>Directions</b></div>
	<table id="directionTable"><tr>
		<td style="topleft"><div id="directionPanel1"></div></td>
		<td>&nbsp;&nbsp;</td>
		<td style="topleft"><div id="directionPanel2"></div></td>
	</tr></table><br/>
	<div>Share Link:<textarea id="linkArea" readonly="readonly" rows="3" cols="100"
	onClick="javascript:this.focus();this.select();"></textarea></div>
	<div id="gplusPanel" class="g-plus" data-action="share" ></div>
	<script type="text/javascript">
		(function() { try {
			var po = document.createElement('script');  po.type = 'text/javascript'; 
			po.async = true; po.src = 'https://apis.google.com/js/plusone.js';
			var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
		} catch(e) { console.log('Error in creating GPlus panel. ' + e.message);}})();
	</script>
</div>
</body>
</html>
